<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>百度一下，你就知道</title>
    <!--标题栏的图标-->
    <link rel="shortcut icon" href="images/favicon.ico"/>
    <link rel="stylesheet" href="css/index.css">
</head>
<body>


<!--头部-->
<div class="header">





 

</div>

<!--内容-->
<div class="content">

    <div class="logo">
        <div><a href="http://www/baidu.com"><img src="images/logo.png" alt=""/></a></div>
<!--利用百度提供的接口实现搜索功能,下面还需要添加js代码-->
        <form onsubmit="return baiduWithHttps(this)" action="http://www.baidu.com/baidu" target="_blank">
            <input name="tn" type="hidden" value="SE_zzsearchcode_shhzc78w">

            <input type="text" onfocus="checkHttps" name="word" size="30" id="search_text">
            <input type="submit" value="百度一下" id="search_button">
        </form>
    </div>


</div>

<!--底部-->
<div class="footer">
    <span> <a href="#">用前必读</a></span>
    <a href="#">意见反馈</a>
</div>


<!--百度搜索的js代码-->
<script src="http://s1.bdstatic.com/r/www/cache/global/js/BaiduHttps_20150714_zhanzhang.js"></script>
<script>
    function checkHttps() {
        BaiduHttps.useHttps();
    }
    ;
    function baiduWithHttps(formname) {
        var data = BaiduHttps.useHttps();
        if (data.s === 0) {
            return true;
        }
        else {
            formname.action = 'https://www.baidu.com/baidu' + '?ssl_s=1&ssl_c' + data.ssl_code;
            return true;
        }
    }
    ;
</script>

</body>
</html>